<?php

class tmenu_add extends SClass {

    public function process() {



                try {
                    if ($this->getControlValue('ok')) {
                        ServiceUtils::GetFactory()->getTmenuService()->addTmenu(
                                $this->getControlValue('name'),
                                $this->getControlValue('url'),
                                $this->getControlValue('position')
                        );
                        $this->assign('message', 'ok');
                    }
                } catch (ServiceUtils_Exception $e) {
                    $this->assign('errors', $e->getErrors());
                }

    }

}